import assessCheckApi from './api'
import { axios } from '@/utils/request'

// 内控-合同登记-分页列表查询
export function list(params){
    return axios({
        url: assessCheckApi.list,
        method:'get',
        params:{...params},
        url_2:'outside',
    })
}
// 内控-合同登记-添加
export function add(data){
    return axios({
        url: assessCheckApi.add,
        method:'post',
        data:{...data},
        url_2:'outside',
    })
}
// 内控-合同登记-通过id删除
export function deletes(params){
    return axios({
        url: assessCheckApi.deletes,
        method:'delete',
        params:{...params},
        url_2:'outside',
    })
}
// 批量删除
export function deleteBatch(params){
    return axios({
        url: assessCheckApi.deleteBatch,
        method:'delete',
        params:{...params},
        url_2:'outside',
    })
}
// 内控-合同登记-编辑
export function edit(data){
    return axios({
        url: assessCheckApi.edit,
        method:'put' ,
        data:{...data},
        url_2:'outside',
    })
}
// 已经结束的行政事务审批
export function lcEndList(params){
    return axios({
        url: assessCheckApi.lcEndList,
        method:'get',
        params:{...params},
        url_2:'outside',
    })
}

// minio-OA-上传附件
export function fjupload(data){
    return axios({
      url: assessCheckApi.fjupload,
      method:'post' ,
      data:data,
      url_2:'outside',
      // responseType: 'arraybuffer'
    })
  }
  // OA附件资源库-编辑
  export function fjedit(data){
    return axios({
      url: assessCheckApi.fjedit,
      method:'put' ,
      data:{...data},
      url_2:'outside',
    })
  }
  // 附件删除
  export function deleleMinioFile(params){
    return axios({
      url: assessCheckApi.deleleMinioFile,
      method:'get' ,
      params:{...params},
      url_2:'outside',
    })
  }
  // OA-打开文档-服务端-只读
  export function openFile(params){
    return axios({
      url: assessCheckApi.openFile,
      method:'get' ,
      params:{...params},
      url_2:'outside',
    })
  }
  // minio-下载附件
  export function downLoadOa(params){
    return axios({
      url: assessCheckApi.downLoadOa,
      method:'get' ,
      params:{...params},
      url_2:'outside',
      responseType: 'arraybuffer'
    })
  }
  // OA附件资源库-分页列表查询
  export function fjlist(params){
    return axios({
      url: assessCheckApi.fjlist,
      method:'get' ,
      params:{...params},
      url_2:'outside',
    })
  }
